package com.hm.pan.model;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import com.alibaba.fastjson.annotation.JSONField;

public class UserFile {

	private Long userfileId;
	@JSONField(serialize = false)
	private Long userId;
	private Long fileId;
	private Timestamp uploadTime;
	private String fileName;
	// true: 文件 fasle: 文件夹
	private Boolean fileType;
	private Long fatherId;
	@JSONField(serialize = false)
	private Boolean isDelete;
	// 文件大小
	private Long fileSize;

	// 排序的字段
	@JSONField(serialize = false)
	private String columnName;
	// 排序方式
	@JSONField(serialize = false)
	private String sortOrder;
	// 按文件名的搜索条件
	@JSONField(serialize = false)
	private String searchOption;
	@JSONField(serialize = false)
	private FileInfo fileInfo;
	// 子文件（夹）
//	@JSONField(serialize = false)
	private Set<UserFile> children;

	public UserFile() {
		children = new HashSet<>();
	}

	@Override
	public String toString() {
		return "UserFile [userfileId=" + userfileId + ", userId=" + userId + ", fileId=" + fileId + ", uploadTime="
				+ uploadTime + ", fileName=" + fileName + ", fileType=" + fileType + ", fatherId=" + fatherId
				+ ", isDelete=" + isDelete + ", fileSize=" + fileSize + ", columnName=" + columnName + ", sortOrder="
				+ sortOrder + ", searchOption=" + searchOption + ", fileInfo=" + fileInfo + ", children=" + children
				+ "]";
	}

	public Long getUserfileId() {
		return userfileId;
	}

	public void setUserfileId(Long userfileId) {
		this.userfileId = userfileId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getFileId() {
		return fileId;
	}

	public void setFileId(Long fileId) {
		this.fileId = fileId;
	}

	public Timestamp getUploadTime() {
		return uploadTime;
	}

	public void setUploadTime(Timestamp uploadTime) {
		this.uploadTime = uploadTime;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public Boolean getFileType() {
		return fileType;
	}

	public void setFileType(Boolean fileType) {
		this.fileType = fileType;
	}

	public Long getFatherId() {
		return fatherId;
	}

	public void setFatherId(Long fatherId) {
		this.fatherId = fatherId;
	}

	public Boolean getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Boolean isDelete) {
		this.isDelete = isDelete;
	}

	public Long getFileSize() {
		return fileSize;
	}

	public void setFileSize(Long fileSize) {
		this.fileSize = fileSize;
	}

	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public String getSortOrder() {
		return sortOrder;
	}

	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder;
	}

	public String getSearchOption() {
		return searchOption;
	}

	public void setSearchOption(String searchOption) {
		this.searchOption = searchOption;
	}

	public FileInfo getFileInfo() {
		return fileInfo;
	}

	public void setFileInfo(FileInfo fileInfo) {
		this.fileInfo = fileInfo;
	}

	public Set<UserFile> getChildren() {
		return children;
	}

	public void setChildren(Set<UserFile> children) {
		this.children = children;
	}

}
